package com.ruoyi.order.service.impl;


import com.ruoyi.order.domain.Approval;
import com.ruoyi.order.mapper.ApprovalMapper;
import com.ruoyi.order.service.IApprovalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 钉钉审批流程信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-03
 */
@Service
public class ApprovalServiceImpl implements IApprovalService
{
    @Autowired
    private ApprovalMapper approvalMapper;

    /**
     * 查询钉钉审批流程信息
     * 
     * @param id 钉钉审批流程信息主键
     * @return 钉钉审批流程信息
     */
    @Override
    public Approval selectApprovalById(Long id)
    {
        return approvalMapper.selectApprovalById(id);
    }

    /**
     * 查询钉钉审批流程信息列表
     * 
     * @param approval 钉钉审批流程信息
     * @return 钉钉审批流程信息
     */
    @Override
    public List<Approval> selectApprovalList(Approval approval)
    {
        return approvalMapper.selectApprovalList(approval);
    }

    /**
     * 新增钉钉审批流程信息
     * 
     * @param approval 钉钉审批流程信息
     * @return 结果
     */
    @Override
    public int insertApproval(Approval approval)
    {
        return approvalMapper.insertApproval(approval);
    }

    /**
     * 修改钉钉审批流程信息
     * 
     * @param approval 钉钉审批流程信息
     * @return 结果
     */
    @Override
    public int updateApproval(Approval approval)
    {
        return approvalMapper.updateApproval(approval);
    }

    /**
     * 批量删除钉钉审批流程信息
     * 
     * @param ids 需要删除的钉钉审批流程信息主键
     * @return 结果
     */
    @Override
    public int deleteApprovalByIds(Long[] ids)
    {
        return approvalMapper.deleteApprovalByIds(ids);
    }

    /**
     * 删除钉钉审批流程信息信息
     * 
     * @param id 钉钉审批流程信息主键
     * @return 结果
     */
    @Override
    public int deleteApprovalById(Long id)
    {
        return approvalMapper.deleteApprovalById(id);
    }
}
